#!/bin/sh
adb root
adb remount
if [ $1 = "email" ]
then
    adb pull data/data/com.android.email/databases/EmailProvider.db ~/Desktop/
    adb pull data/data/com.android.email/databases/EmailProviderBody.db ~/Desktop/
    sqlitebrowser ~/Desktop/EmailProvider.db &
    sqlitebrowser ~/Desktop/EmailProviderBody.db &
elif [ $1 = "calendar" ]
then
    adb pull data/data/com.android.providers.calendar/databases/calendar.db ~/Desktop/
    sqlitebrowser ~/Desktop/calendar.db &
elif [ $1 = "contact" ]
then
    adb pull data/data/com.android.providers.contacts/databases/contacts2.db ~/Desktop/
    sqlitebrowser ~/Desktop/contacts2.db &
fi
